<template>
  <div class="cms-renew" :class="`style_${type}`">
    <div v-if="type === 2" class="change-text">换一换</div>
    <sync-outlined
      v-if="type !== 3"
      :style="{ color: type === 2 ? '#4B5363' : '#ff512b' }"
      style="align-self: center"
    />
    <div v-if="type === 1" class="change-text">换一换</div>

    <div v-if="type === 3" class="more">
      <div class="change-text">更多</div>
      <right-outlined style="color: #ff512b; font-size: 12px; align-self: center" />
    </div>
    <div v-if="type === 3" class="change">
      <div class="change-text">换一换</div>
      <sync-outlined style="color: #ff512b; align-self: center" />
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import cmsRenewViewProps from './props'
import { SyncOutlined, RightOutlined } from '@ant-design/icons-vue'

export default defineComponent({
  props: cmsRenewViewProps,
  data() {
    return {
      baseUrl: '/src/components/cms/components/'
    }
  },
  components: {
    SyncOutlined,
    RightOutlined
  }
})
</script>
<style scoped lang="less">
.cms-renew {
  width: 375px;
  height: 32px;

  background-color: #fff;
  padding: 8px 16px;
  @apply flex justify-center;
}
.change-text {
  font-size: 12px;
  align-self: center;
}
&.style_1 {
  .change-text {
    color: #848494;
    line-height: 12px;
    margin-left: 6px;
  }
}
&.style_2 {
  height: 32px;
  background: #f8f8f8;
  border-radius: 6px;
  .change-text {
    color: #4b5363;
    line-height: 12px;
    margin-right: 6px;
  }
}
&.style_3 {
  height: 32px;
  padding: 0 16px;
  @apply flex justify-between gap-x-2;
  .more,
  .change {
    width: 163px;
    height: 32px;
    background: #fff6f4;
    border-radius: 3px;
    @apply flex justify-center;
  }
  .change-text {
    font-size: 12px;
    color: #4b5363;
    letter-spacing: 0;
    line-height: 12px;
    font-weight: 400;
    margin-right: 4px;
  }
}
</style>
